<template>
	<view>
		<view class="list">
			<uni-list :border="false">
				<uni-list-item title="订单单号" :rightText="orderDetail.orderId"></uni-list-item>
				<uni-list-item title="收件人" :rightText="orderDetail.username"></uni-list-item>
				<uni-list-item title="收件地址">
					<template slot="footer">
						<view class="address">{{orderDetail.address}}</view>
					</template>
				</uni-list-item>
				<uni-list-item title="电话" :rightText="orderDetail.phone"></uni-list-item>
				<!-- <uni-list-item title="总价" v-if="userType==='0' || userType==='1' || userType==='5' || userType==='6'"
					:rightText="`￥${orderDetail.totalPrices}`"></uni-list-item> -->
				<uni-list-item title="订单状态" :rightText="orderDetail.status" link v-if="userType !== '5'"
					:to="`/pages/orderStatus/orderStatus?orderId=${orderDetail.orderId}`">
				</uni-list-item>
				<uni-list-item title="业务员" :rightText="`${orderDetail.salesmanInfo.name}`"
					v-if="orderDetail.salesmanInfo"></uni-list-item>
				<uni-list-item title="配送员" :rightText="`${orderDetail.courierInfo.name}`"
					v-if="orderDetail.courierInfo && orderDetail.courierInfo.name">
				</uni-list-item>
			</uni-list>
		</view>
		<uni-group v-for="(item,index) in orderDetail.shopList" :key="index" title="商品信息" mode="card">
			<uni-list :border="false">
				<uni-list-item title="商品名称" :rightText="item.name"></uni-list-item>
				<uni-list-item title="外箱编码" :rightText="item.caseCode"></uni-list-item>
				<uni-list-item title="瓶盒编码" :rightText="item.vaseCode"></uni-list-item>
				<uni-list-item title="数量" :rightText="item.count"></uni-list-item>
				<!-- <uni-list-item title="价格" v-if="userType==='0' || userType==='1' || userType==='5' || userType==='6'"
					:rightText="`￥${item.price}`"></uni-list-item> -->
				<!-- 显示剩余数量--财务可见 -->
				<uni-list-item v-if="userType==='1'" title=" " :rightText="`该商品剩余数量为${item.numberRemaining}`">
				</uni-list-item>
			</uni-list>
		</uni-group>
	</view>
</template>

<script>
	export default {
		name: "OrderDetailList",
		data() {
			return {}
		},
		props: {
			orderDetail: {
				type: Object
			}
		},
	}
</script>

<style lang="scss" scoped>
	.list {
		padding: 10rpx;
		margin-bottom: 40rpx;
		box-shadow: 0 0 8rpx -1rpx;
	}
</style>
